﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using ESF.MUP.BasePlatform.Domain.Model;
using ESF.MUP.BasePlatform.DbRepositories;
using System.Data.Entity;

namespace ESF.MUP.BasePlatform.DbRepository.MSSQL.Model
{
    public class EndpointModelBuilder
    {
        public static void ConfigureDatabase(DbModelBuilder modelBuilder)
        {
            modelBuilder.Entity<Endpoint>().ToTable("Endpoint");
            modelBuilder.Entity<UriEndpoint>().ToTable("UriEndpoint");
            modelBuilder.Entity<DatabaseEndpoint>().ToTable("DatabaseEndpoint");

            modelBuilder.Entity<Endpoint>().Property(e => e.Id).HasColumnName("Id");

            //modelBuilder.Entity<Application>().Property(a => a.Name).HasColumnName("Name");
            //modelBuilder.Entity<Application>().Property(a => a.Description).HasColumnName("Description");

            modelBuilder.Entity<Endpoint>().HasKey(e => e.Id);

        }
    }
}
